if [[ -z ${ZSH_VERSION} ]]; then
  echo 'You must use zsh to run install.zsh' >&2
  exit 1
fi

emulate -L zsh -o EXTENDED_GLOB

_replace_home() {
  local abs_path=${1:A}
  local suffix=${abs_path#${<%= home %>:A}}
  if [[ ${abs_path} != ${suffix} ]]; then
    print -R '<%= home %>'${suffix}
  else
    print -R ${1}
  fi
}

typeset -A ZTEMPLATES
readonly CLEAR_LINE=$'\E[2K\r'
ZIM_HOME_STR='<%= home %>/.zim'
